<?php
require_once('../utils/logged_in.php');
require_once('../utils/functions.php');

$storeitemid = $_POST["storeitemid"];

$result = tryPurchase($drupaluid, $storeitemid);
if ($result == NULL)
	die('{ "success": false, "message": "purchase failed!" }');

die('{ "success": true, "current_points": "'.$result.'" }');

?>
